From 7de7f5446fecc07342d9911f7ec98e2d13a591e8 Mon Sep 17 00:00:00 2001 From: "Laszlo Boszormenyi (GCS)" Date: Sat, 27 Sep 2014 08:37:31 +0100 Subject: [PATCH] GraphicsMagick-1.3.20-CVE-2014-1947 Gbp-Pq: Name GraphicsMagick-1.3.20-CVE-2014-1947.patch --- coders/psd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/coders/psd.c b/coders/psd.c index bff5772..b9832d5 100644 --- a/coders/psd.c +++ b/coders/psd.c @@ -1719,8 +1719,7 @@ static unsigned int WritePSDImage(const ImageInfo *image_info,Image *image) i; unsigned char - *pixels, - layer_name[4]; + *pixels; unsigned int packet_size, @@ -1944,8 +1943,9 @@ static unsigned int WritePSDImage(const ImageInfo *image_info,Image *image) (void) WriteBlob(image, 3, &layer_name[1]); */ } else { - (void) sprintf((char *) layer_name, "L%02d", layer_count++ ); - WritePascalString( image, (char*)layer_name, 4 ); + char layer_name[MaxTextExtent]; + (void) sprintf(layer_name, "L%02d", layer_count++ ); + WritePascalString( image, layer_name, 4 ); } tmp_image = tmp_image->next; }; -- 2.30.2